package com.baichang.taoshunda.service;

import com.baichang.framework.excelption.ServiceException;
import com.baichang.taoshunda.entity.Bussiness;
import com.baichang.taoshunda.entity.Order;

import java.util.Map;

public interface CompanyBalanceService {

    /**
     * 根据日期查看商家账单
     *  @param bussId 商家编号
     * @param startDate
     * @param date   日期  @return
     * @param nowPage
     * @param pageSize
     */
    Map<String, Object> findBussinessBills(Integer bussId, String startDate, String date, Integer nowPage, Integer pageSize) throws ServiceException;

    /**
     * 查看商家钱包信息
     *
     * @param bussinessId 商家编号
     * @return
     */
    Map<String, Object> findBussinessWallet(Integer bussinessId) throws ServiceException;

    /**
     * @param order
     * @param bussiness
     * @return
     */
    boolean saveCompanyBalance(Order order, Bussiness bussiness);

    /**
     * 退款
     *
     * @param order
     * @param bussiness
     * @return
     */
    boolean saveReturnMoney(Order order, Bussiness bussiness);

    /**
     * 提现
     *
     * @param bussiness
     * @param money
     * @return
     */
    boolean saveCash(Bussiness bussiness, Double money);

    /**
     * 同意退货
     *
     * @param order
     * @param bussiness
     * @return
     */
    boolean saveReturnGoods(Order order, Bussiness bussiness);
}
